<?php

session_start();

include('../../../seesmicwsdbinfo-live.php');

$video_id = $_GET['video_id'];
$url = trim($_GET['url']);

// connect to the database
$wslink = mysql_connect($wsdbhost, $wsdbuser, $wsdbpass);
if (!$wslink) {
	die('Problem connecting to database server : ' . mysql_error());
}

// make $dbname the current db
$wsdb_selected = mysql_select_db($wsdbname, $wslink);
if (!$wsdb_selected) {
	die ('Problem connecting to database : ' . mysql_error());
}

$wslinkstmt = "INSERT INTO links (video_id, url) VALUES ('$video_id', '$url')";

$wslinkres = mysql_query($wslinkstmt,$wslink);
if (!$wslinkres) {
	die ('Problem with query : ' . mysql_error());
}

mysql_close($wslink);
?>

<div align="center">
<br /><br /><br />
<span style="text-decoration:none;color:white;font-size: 150%;font-family: arial, 'lucida console', sans-serif;">
<p>LINK ADDED!!!</p>
<br /><br /><br />
</span>
</div>